package com.atguigu.boot.config;

import com.atguigu.boot.bean.Color;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * ClassName: MyConfig
 * Package: com.atguigu.boot.config
 * Description:
 *
 * @Author Root
 * @Create 2023/5/25 16:36
 * @Version 1.0
 */
@Configuration
public class MyConfig {

    @Profile("prod")
    @Bean
    public Color red(){
        return new Color();
    }

    @Profile("test")
    @Bean
    public Color green(){
        return new Color();
    }
}
